/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author YDZ
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '../model/baseModel';

const { adminPath } = useGlobSetting();

export interface MesLineError extends BasicModel<MesLineError> {
  lineCode?: string; // 机台
  errorType?: string; // 异常类型
  createByName?: string; // 上报人
  dealDate?: string; // 处理时间
  dealResult?: string; // 处理结果
  dealUserName?: string; // 处理人
}

export const mesLineErrorList = (params?: MesLineError | any) =>
  defHttp.get<MesLineError>({ url: adminPath + '/mo/error/mesLineError/list', params });

export const mesLineErrorListData = (params?: MesLineError | any) =>
  defHttp.post<Page<MesLineError>>({ url: adminPath + '/mo/error/mesLineError/listData', params });

export const mesLineErrorForm = (params?: MesLineError | any) =>
  defHttp.get<MesLineError>({ url: adminPath + '/mo/error/mesLineError/form', params });

export const mesLineErrorSave = (params?: any, data?: MesLineError | any) =>
  defHttp.postJson<MesLineError>({ url: adminPath + '/mo/error/mesLineError/save', params, data });

export const mesLineErrorDelete = (params?: MesLineError | any) =>
  defHttp.get<MesLineError>({ url: adminPath + '/mo/error/mesLineError/delete', params });

export const mesLineErrorDeal = (params?: MesLineError | any) =>
  defHttp.get<MesLineError>({ url: adminPath + '/mo/error/mesLineError/errorDeal', params });
